export default {
  color: ['#006dff', '#2acc85', '#ffbb00', '#ff584c', '#9741d9', '#21c0cd', '#7cd935'],
  tooltip: {
    trigger: 'axis',
    // 横轴显示虚线
    axisPointer: {
      type: 'cross'
    },
    formatter: function (params) {
      let res = ''
      let color = ['#006dff', '#2acc85', '#ffbb00', '#ff584c', '#9741d9', '#21c0cd', '#7cd935']
      for (var i = 0, l = params.length; i < l; i++) {
        res += '<br/>' + '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:' + color[i] + '"></span>' +
                params[i].seriesName + ' : ' + params[i].value + '人'
      }
      res = params[0]['axisValueLabel'] + res
      return res
    }
  },
  graphic: [
    {
      type: 'text',
      left: 'center',
      top: 'middle',
      z: 1,
      style: {
        text: '暂无数据',
        fill: 'transparent'
      }
    }
  ],
  legend: {
    orient: 'horizontal',
    x: 'center',
    y: 'bottom',
    data: [],
    icon: 'circle',
    itemWidth: 10,
    itemGap: 5
  },
  toolbox: {
    feature: {
      saveAsImage: {}
    }
  },
  xAxis: {
    type: 'category',
    boundaryGap: false,
    data: [],
    axisLabel: {
      // x轴 间隔一个显示出来
      interval: 1
    },
    axisLine: {
      show: false
    }
  },
  yAxis: {
    type: 'value',
    splitLine: {
      lineStyle: {
        type: 'dashed'
      }
    },
    axisTick: {
      show: false
    },
    axisLine: {
      show: false
    },
    minInterval: 1
  },
  series: [
    {
      name: '小于18岁',
      type: 'line',
      smooth: true,
      data: []
    },
    {
      name: '18-23岁',
      type: 'line',
      smooth: true,
      data: []
    },
    {
      name: '24-30岁',
      type: 'line',
      smooth: true,
      data: []
    },
    {
      name: '31-40岁',
      type: 'line',
      smooth: true,
      data: []
    },
    {
      name: '41-50岁',
      type: 'line',
      smooth: true,
      data: []
    },
    {
      name: '51-60岁',
      type: 'line',
      smooth: true,
      data: []
    },
    {
      name: '大于61岁',
      type: 'line',
      smooth: true,
      data: []
    }
  ]
}
